<?php
class Main_Controller extends Base_Controller {

	/**
	 * @var GladeXML instance to build the interface
	 */
	private $objGlade;
	
	/**
	 * Construtor
	 * Constructor
	 * @param int $intUserId
	 */
	public function __construct() {
		$this->objGlade = new GladeXML(dirname(__FILE__) . '/resources/xml/main.glade');
		$this->objGlade->signal_autoconnect_instance($this);
		$window = $this->objGlade->get_widget('mainWindow');
		$window->set_title(ts::config('title.main'));
		$window->maximize();

		$this->openLoginWindow();
	}
	
	/**
	 * Abre a janela de login
	 * Opens the login window
	 */
	public function openLoginWindow() {
		$objLoginWindow = new Login_Controller();
	}
	
	/**
	 * Finaliza a execução do programa
	 * Stops the program
	 */
	public function mainWindow_destroy() {
		Gtk::main_quit();
	}
}
?>